package com.wza.designPattern.AbstructFactoryPattern;

import com.wza.designPattern.interfaces.Color;
import com.wza.designPattern.interfaces.Shape;

/**
 * <一句话功能简述>
 * <功能详细描述>
 *
 * @author Administrator
 * @version [版本号, 2018/11/20]
 * @see [相关类/方法]
 * @since [产品/模块版本]
 */
public class AbstructFactoryPatternDemo
{
    public static void main(String[] args)
    {
        AbstractFactory shapeFactory = AbstructFactoryProvider.getFactory("SHAPE");
        Shape circle = shapeFactory.getShape("CIRCLE");
        circle.draw();

        AbstractFactory colorFactory = AbstructFactoryProvider.getFactory("COLOR");
        Color red = colorFactory.getColor("RED");
        red.fill();
    }
}
